<!DOCTYPE html>
<html>
<head>
  <title>订单跟踪表</title>
  <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
  <div v-show="act=='list'">
    <div class="grid-btn">
      <#if shiro.hasPermission("sys:finance:save")>
      <a @click="add" class="btn btn-primary"><i class="fa fa-plus"></i>&nbsp;新增</a>
    </#if>
    <!--<#if shiro.hasPermission("sys:finance:update")>
    <a @click="update" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
    </#if>-->
    <#if shiro.hasPermission("sys:finance:delete")>
    <a @click="del" class="btn btn-primary"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
  </#if>
  <#if shiro.hasPermission("sys:finance:dispatch")>
  <a @click="dispatch" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i>&nbsp;派车</a>
</#if>
<#if shiro.hasPermission("sys:finance:check")>
<a @click="check" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i>&nbsp;财务审核</a>
</#if>
</div>
<table id="jqGrid"></table>
<div id="jqGridPager"></div>
</div>

<div class="panel panel-default box-main" v-if="act=='edit'">
  <div class="panel-heading">{{title}}</div>
  <form class="form-horizontal">

    <div class="box-body">
      <div class="form-unit">业务接单信息</div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>客户编码
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="客户编码" type="text" v-model="finance.customnumber" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>客户简称
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="客户简称" type="text" v-model="finance.customsimplename" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>客户全称
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="客户全称" type="text" v-model="finance.customname" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>联系人
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="联系人" type="text" v-model="finance.contactperson" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>联系电话
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="联系电话" type="text" v-model="finance.contactpersontel" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>运单编号
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="运单编号" type="text" v-model="finance.waybill" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>提货单位
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="提货单位" type="text" v-model="finance.delivercompany" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>送货地址
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="送货地址" type="text" v-model="finance.deliveraddress" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>送货联系人
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="送货联系人" type="text" v-model="finance.deliverperson" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>提货电话
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="提货电话" type="text" v-model="finance.delivertel" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>提空地点
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="提空地点" type="text" v-model="finance.pickemptyaddress" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>提空联系人
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="提空联系人" type="text" v-model="finance.pickemptyperson" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>提空联系人电话
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="提空联系人电话" type="text" v-model="finance.pickemptytel" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>还空地点
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="还空地点" type="text" v-model="finance.backemptyaddress" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>还空联系人
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="空还联系人" type="text" v-model="finance.backemptyperson" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>还空联系人电话
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="还空联系人电话" type="text" v-model="finance.backemptytel" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>提重地点
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="提重地点" type="text" v-model="finance.pickweightaddress" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>提重联系人
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="重提联系人" type="text" v-model="finance.pickweightperson" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>重提联系人电话
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="重提联系人电话" type="text" v-model="finance.pickweighttel" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>还重地点
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="还重地点" type="text" v-model="finance.backweightaddress" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>还重联系人
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="还重联系人" type="text" v-model="finance.backweightperson" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>还重联系人电话
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="还重联系人电话" type="text" v-model="finance.backweighttel" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
    </div>



    <div class="box-body">
      <div class="form-unit">委托信息</div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>船名
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="船名" type="text" v-model="finance.shipname" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>航次
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="航次" type="text" v-model="finance.voyage" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>提单号
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="提单号" type="text" v-model="finance.ladingbil" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>货名
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="货名" type="text" v-model="finance.desinname" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>件数
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="件数" type="text" v-model="finance.packages" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>量重
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="量重" type="text" v-model="finance.weight" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>寸尺
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="寸尺" type="text" v-model="finance.measurement" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>是否危险品
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <select class="form-control" v-model="finance.isdanger" v-bind:disabled="step > 1">
                <option value="否">否</option>
                <option value="是">是</option>
              </select>
              <!--
  <input class="form-control" placeholder="是否危险品" type="text" v-model="finance.isdanger" v-bind:disabled="step > 1" />
-->
            </div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>是否冷箱
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <select class="form-control" v-model="finance.iscoldbox" v-bind:disabled="step > 1">
                <option value="否">否</option>
                <option value="是">是</option>
              </select>
              <!--
  <input class="form-control" placeholder="是否冷箱" type="text" v-model="finance.iscoldbox" v-bind:disabled="step > 1" />
-->
            </div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>冷箱温度
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="冷箱温度" type="text" v-model="finance.coldboxtemp" v-bind:disabled="step > 1 || finance.iscoldbox=='否'" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>是否集装箱散货
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <select class="form-control" v-model="finance.iscontainerbulk" v-bind:disabled="step > 1">
                <option value="是">是</option>
                <option value="否">否</option>
              </select>
              <!--
              <input class="form-control" placeholder="是否集装箱散货" type="text" v-model="finance.iscontainerbulk" v-bind:disabled="step > 1" />
               -->
            </div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>业务类型
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="业务类型（1.内贸，2.外贸）" type="text" v-model="finance.businesstype" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>提（送）货
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="提（送）货" type="text" v-model="finance.ispickdelivery" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
    </div>


    <div class="box-body" v-if="step > 1">
      <div class="form-unit">集装箱信息</div>
      <div class="row">
        <div class="col-xs-12">
          <!--<div><a @click="c_add()" class="btn btn-primary"><i class="fa fa-plus"></i>&nbsp;添加</a></div>-->
          <table class="table table-striped">
            <thead>
            <tr>
              <th>运单编号</th>
              <th>集装箱号</th>
              <th>箱型</th>
              <th>封号</th>
              <th>货号</th>
              <th>件数</th>
              <th>重量</th>
              <th>体积</th>
              <th>车号</th>
              <th>司机</th>
              <th>派车时间</th>
              <!--      <th>操作</th>-->
              <!--      <th>-->
              <!--      </th>-->
            </tr>
            </thead>
            <tbody>
            <tr v-for="item in containerList" :key="item.id">
              <td>{{item.containerno}}</td>
              <td>{{item.type}}</td>
              <td>{{item.id}}</td>
              <td>{{item.closeno}}</td>
              <td>{{item.id}}</td>
              <td>{{item.amount}}</td>
              <td>{{item.id}}</td>
              <td>{{item.id}}</td>
              <td>{{item.car}}</td>
              <td>{{item.driver}}</td>
              <td>{{item.dipatchTime}}</td>
              <!--      <td>-->
              <!--      <a @click="c_modify(item.id)" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>-->
              <!--      <a @click="c_del(item.id)" class="btn btn-primary"><i class="fa fa-trash-o"></i>&nbsp;删除</a>-->
              <!--      </td>-->
            </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>

    <div class="box-body" v-if="step > 2">
      <div class="form-unit">收款明细</div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>运费
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="运费" type="text" v-model="finance.receiptFreight" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>换单费
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="换单费" type="text" v-model="finance.receiptChangeOrder" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>港杂费
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="港杂费" type="text" v-model="finance.receiptExtras" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">其他
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="其他" type="text" v-model="finance.receiptOthers" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
    </div>
    <div class="box-body" v-if="step > 2">
      <div class="form-unit">付款明细</div>
      <div class="row">
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>换单费
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="换单费" type="text" v-model="finance.paymentChangeOrder" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span>港杂费
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="港杂费" type="text" v-model="finance.paymentExtras" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
        <div class="col-xs-4">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">其他
              <i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <input class="form-control" placeholder="其他" type="text" v-model="finance.paymentOthers" v-bind:disabled="step > 1" /></div>
          </div>
        </div>
      </div>
    </div>

    <div class="box-footer">
      <div class="row">
        <div class="col-sm-offset-2 col-sm-10">
          <input @click="saveOrUpdate" class="btn btn-primary" type="button" value="确定" />&nbsp;&nbsp;
          <input @click="reload" class="btn btn-warning" type="button" value="返回" /></div></div>
    </div>
  </form>
</div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/finance.js?_${.now?long}"></script>
</body>
</html>